Flush serial port on open.
authorrobertl <robertl>
Sat, 21 Feb 2009 19:07:45 +0000 (19:07 +0000)
committerrobertl <robertl>
Sat, 21 Feb 2009 19:07:45 +0000 (19:07 +0000)
jeeps/gpsapp.c
jeeps/gpsserial.c

index 693d9a1389a6a0d96f1564bc332da748cbe1062b..1b8fa43909136c46d4489e14e061716790f0c58b 100644 (file)
@@ -3366,7 +3366,7 @@ static void GPS_D201_Send(UC *data, GPS_PWay way, int32 *len)
     p = data;
 
     *p++ = way->rte_num;
-    copy_char_array(&p, way->rte_cmnt, 20, 1);
+    copy_char_array(&p, way->rte_cmnt, 20, UpperYes);
     *len = 21;
 
     return;
index b8cfdfec524f7e612d1dcf0cdb29a1803a6aecb1..a8e650ae56ebff2ed075bc539b76a0a273a3bae6 100644 (file)
@@ -281,7 +281,7 @@ int32 GPS_Serial_Open(gpsdevh *dh, const char *port)
     tty.c_cc[VMIN] = 1;
     tty.c_cc[VTIME] = 0;
 
-    if(tcsetattr(psd->fd,TCSANOW,&tty)==-1)
+    if(tcsetattr(psd->fd,TCSANOW|TCSAFLUSH,&tty)==-1)
     {
        GPS_Serial_Error("SERIAL: tcsetattr error");
        return 0;